package iva;

import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormAttachment;
import com.swtdesigner.SWTResourceManager;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;

public class Proveedor2 {

	protected Shell shlProveedorBuscar;
	private Composite composite;
	private Text text;
	private Table table;
	private Text text_1;
	private TableColumn tblclmnProveedores;

	/**
	 * Launch the application.
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			Proveedor2 window = new Proveedor2();
			window.open();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Open the window.
	 */
	public void open() {
		Display display = Display.getDefault();
		createContents();
		shlProveedorBuscar.open();
		shlProveedorBuscar.layout();
		while (!shlProveedorBuscar.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
	}

	/**
	 * Create contents of the window.
	 */
	protected void createContents() {
		shlProveedorBuscar = new Shell(SWT.CLOSE);
		shlProveedorBuscar.setImage(SWTResourceManager.getImage(Proveedor2.class, "/imagenes/AppIcon.png"));
		shlProveedorBuscar.setSize(400, 488);
		shlProveedorBuscar.setText("Proveedor - Buscar Datos");
		shlProveedorBuscar.setLayout(new FormLayout());
		
		composite = new Composite(shlProveedorBuscar, SWT.BORDER);
		composite.setLayout(new GridLayout(2, false));
		FormData fd_composite = new FormData();
		fd_composite.top = new FormAttachment(0, 10);
		fd_composite.left = new FormAttachment(0, 10);
		fd_composite.bottom = new FormAttachment(0, 54);
		fd_composite.right = new FormAttachment(0, 382);
		composite.setLayoutData(fd_composite);
		
		Composite composite_1 = new Composite(shlProveedorBuscar, SWT.BORDER);
		FormData fd_composite_1 = new FormData();
		fd_composite_1.bottom = new FormAttachment(composite, 136, SWT.BOTTOM);
		fd_composite_1.right = new FormAttachment(0, 382);
		fd_composite_1.top = new FormAttachment(composite, 6);
		
		text = new Text(composite, SWT.BORDER | SWT.WRAP);
		GridData gd_text = new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1);
		gd_text.heightHint = 30;
		text.setLayoutData(gd_text);
		
		Button btnBuscar = new Button(composite, SWT.NONE);
		GridData gd_btnBuscar = new GridData(SWT.LEFT, SWT.FILL, false, true, 1, 1);
		gd_btnBuscar.widthHint = 74;
		btnBuscar.setLayoutData(gd_btnBuscar);
		btnBuscar.setText("Buscar");
		composite_1.setLayout(new FormLayout());
		fd_composite_1.left = new FormAttachment(0, 10);
		composite_1.setLayoutData(fd_composite_1);
		
		Composite composite_2 = new Composite(shlProveedorBuscar, SWT.BORDER);
		FormData fd_composite_2 = new FormData();
		fd_composite_2.bottom = new FormAttachment(composite_1, 211, SWT.BOTTOM);
		fd_composite_2.top = new FormAttachment(composite_1, 6);
		
		table = new Table(composite_1, SWT.BORDER | SWT.FULL_SELECTION);
		FormData fd_table = new FormData();
		fd_table.bottom = new FormAttachment(0, 126);
		fd_table.right = new FormAttachment(0, 368);
		fd_table.top = new FormAttachment(0);
		fd_table.left = new FormAttachment(0);
		table.setLayoutData(fd_table);
		table.setHeaderVisible(true);
		table.setLinesVisible(true);
		
		tblclmnProveedores = new TableColumn(table, SWT.NONE);
		tblclmnProveedores.setWidth(337);
		tblclmnProveedores.setText("Proveedores");
		composite_2.setLayout(new GridLayout(2, false));
		fd_composite_2.left = new FormAttachment(0, 10);
		fd_composite_2.right = new FormAttachment(0, 382);
		composite_2.setLayoutData(fd_composite_2);
		
		Label label = new Label(composite_2, SWT.NONE);
		label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
		label.setText("New Label");
		
		text_1 = new Text(composite_2, SWT.BORDER);
		text_1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
		
		Composite composite_3 = new Composite(shlProveedorBuscar, SWT.NONE);
		FormData fd_composite_3 = new FormData();
		fd_composite_3.top = new FormAttachment(composite_2, 6);
		fd_composite_3.right = new FormAttachment(composite, 0, SWT.RIGHT);
		fd_composite_3.left = new FormAttachment(0, 10);
		fd_composite_3.bottom = new FormAttachment(100, -5);
		composite_3.setLayoutData(fd_composite_3);
		
		Button btnCerrar = new Button(composite_3, SWT.NONE);
		btnCerrar.setBounds(272, 5, 100, 33);
		btnCerrar.setText("Cerrar");

	}
}
